package com.xcw;

/**
 * @Author bhx
 * @Date 2022/9/12 21:24
 * @Description TODO
 */
public class Originator   {

    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    /**
     * 保存备忘录的方法
     * @return
     */
    public Memento saveStateMemento(){
        return new Memento(state);
    }

    public void getStateFromMomento(Memento memento){
        state = memento.getSate();
    }


}
